package zdream.pmfield.data.foe;

import java.util.Objects;

/**
 * @author Zdream
 * @date 2023-12-21
 * @since 0.0.1
 */
public enum MoveBlastType {
	SINGLE("O"),
	BLAST121("xOx"),
	BLAST222("XOX"),
	BLAST11211("xxOxx"),
	FORWARD21("Ox"),
	FORWARD211("Oxx"),
	FORWARD22("OX"),
	BACKWARD12("xO"),
	BACKWARD112("xxO"),
	BACKWARD22("XO"),
	;

	public final String info;

	MoveBlastType(String info) {
		this.info = Objects.requireNonNull(info);
	}

	@Override
	public String toString() {
		return info;
	}

	public static MoveBlastType of(String info) {
		for (MoveBlastType value : values()) {
			if (value.info.equals(info)) {
				return value;
			}
		}
		throw new RuntimeException("invalid move blast type: " + info);
	}
}
